﻿
--添加员工职务
CREATE proc [dbo].[proc_Employee_ZhiWu_Create]
(
    @Pid int,
	@title nvarchar(50)
)
 as
   declare @pxnum_new varchar(50),@ct int
   --select PxNum=@pxnum from Employee_ZhiWu where Pid=@Pid

    set @ct=isnull((Select count(0) from Employee_ZhiWu where Pid=@Pid),0)+1

   
   set @pxnum_new = ''+cast(@Pid as varchar(50))+''+ '0' +''+cast(@ct as varchar(50))+''


	insert into Employee_ZhiWu (Pid,PxNum,Title,UpTime) values(@Pid,@pxnum_new,@title,getdate())

